home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8936 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.3 KB  |  42 lines

  1. Path: pop.gnn.com!PLayton
  2. From: PLayton@gnn.com (Pam Layton)
  3. Newsgroups: comp.lang.c++
  4. Subject: Class problem
  5. Date: Tue, 27 Feb 1996 10:08:45
  6. Organization: APCO, Inc.
  7. Message-ID: <4gv6j2$klv@news-e2b.gnn.com>
  8. NNTP-Posting-Host: www-33-67.gnn.com
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset="us-ascii"
  11. X-GNN-NewsServer-Posting-Date: 27 Feb 1996 15:05:06 GMT
  12. X-Mailer: GNNmessenger 1.2
  13.  
  14. Hi.  I'm new at C++ programming.  I am working on a program (that 
  15. is to be complete by 2/28/96).  I have to have one class of name 
  16. information, and one class of address information.  I have a menu 
  17. to choose whether to add, display, remove or exit.  I have most of 
  18. the code written.  My problem:  I use Borland C++ ver. 3.1.  It 
  19. keeps giving me an error saying "Illegal Structure Operation" on 
  20. these two lines:
  21.                   cin >> addr.zip;
  22.                   cin >> addr.phone;
  23.  
  24. Both of these fields are listed within my address class.  I have it 
  25. listed as:
  26.                 class addr_data:public name_data
  27.                 {
  28.                  public:
  29.                      char street[25];
  30.                      char city[15];
  31.                      char state[3];
  32.                      int zip[11];
  33.                      int phone[10];
  34.                  }addr;
  35.  
  36. Can someone please tell me what is wrong with this picture?  I 
  37. appreciate it.
  38.  
  39. Pam
  40.  
  41.  
  42.